﻿using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
using Pay.TO;

namespace Pay.DTO {
    /// <summary>
    /// 注册提交信息
    /// </summary>
    [JsonObject(MemberSerialization.OptOut)]
    public class register_model {
        public register_model() {
        }
        /// <summary>
        /// 手机号码
        /// </summary>
        [Required(ErrorMessage = "请填写手机号码")]
        [StringLength(11, ErrorMessage = "手机号码必须是11位", MinimumLength = 11)]
        public string mobile { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [Required(ErrorMessage = "请填写密码")]
        public string password { get; set; }
        /// <summary>
        /// 确认密码
        /// </summary>
        [Required(ErrorMessage = "请填写确认密码")]
        public string re_password { get; set; }
        /// <summary>
        /// 验证码
        /// </summary>
        public string code { get; set; }
        //[Required(ErrorMessage = "请填写验证码")]

        /// <summary>
        /// 区域号
        /// </summary>
        public string mobile_code { get; set; }
        /// <summary>
        /// OEM编号
        /// </summary>
        public string oem_no { get; set; }
        /// <summary>
        /// 昵称
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 上级商户号
        /// </summary>
        public string parent_no { get; set; }
        /// <summary>
        /// 是否OEM商户
        /// </summary>
        public bool is_oem { get; set; }
        /// <summary>
        /// 是否供应商
        /// </summary>
        public bool is_supplier { get; set; }
        /// <summary>
        /// 是否平台商户
        /// </summary>
        public bool is_platform { get; set; }
        /// <summary>
        /// 角色id
        /// </summary>
        public long role_id { get; set; }
        /// <summary>
        /// 等级id
        /// </summary>
        public long? grade_id { get; set; }
        /// <summary>
        /// 客户唯一标识
        /// </summary>
        public string open_id { get; set; }
        /// <summary>
        /// 用户类型
        /// </summary>
        public UserType user_type { get; set; }
    }

    /// <summary>
    /// 找回密码
    /// </summary>
    public class forget_model {
        public forget_model() {
        }
        /// <summary>
        /// 手机号码
        /// </summary>
        [Required(ErrorMessage = "请填写手机号码")]
        [StringLength(11, ErrorMessage = "手机号码必须是11位", MinimumLength = 11)]
        public string mobile { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [Required(ErrorMessage = "请填写密码")]
        public string password { get; set; }
        /// <summary>
        /// 确认密码
        /// </summary>
        [Required(ErrorMessage = "请填写确认密码")]
        public string re_password { get; set; }
        /// <summary>
        /// 验证码
        /// </summary>
        public string code { get; set; }

        /// <summary>
        /// 区域号
        /// </summary>
        public string mobile_code { get; set; }
        /// <summary>
        /// OEM编号
        /// </summary>
        public string oem_no { get; set; }
    }


    /// <summary>
    /// 换绑手机号码
    /// </summary>
    public class change_mobile_model {
        /// <summary>
        /// 手机号码
        /// </summary>
        [Required(ErrorMessage = "请填写手机号码")]
        [StringLength(11, ErrorMessage = "手机号码必须是11位", MinimumLength = 11)]
        public string mobile { get; set; }
        /// <summary>
        /// 验证码
        /// </summary>
        [Required(ErrorMessage = "请填写验证码")]
        public string code { get; set; }
    }
    /// <summary>
    /// 修改密码请求信息
    /// </summary>
    public class change_pwd_model {
        /// <summary>
        /// 原来密码
        /// </summary>
        [Required(ErrorMessage = "请填写原来密码")]
        public string old_password { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [Required(ErrorMessage = "请填写密码")]
        public string password { get; set; }
        /// <summary>
        /// 确认密码
        /// </summary>
        [Required(ErrorMessage = "请填写确认密码")]
        public string re_password { get; set; }
    }

    /// <summary>
    /// 注册提交信息
    /// </summary>
    [JsonObject(MemberSerialization.OptOut)]
    public class register_model_ex : head_req {
        public register_model_ex() {
        }
        /// <summary>
        /// 手机号码
        /// </summary>
        public string mobile { get; set; }
        /// <summary>
        /// 昵称
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 客户唯一标识
        /// </summary>
        public string open_id { get; set; }
    }
}
